function notifyDelivery(ev, ok) {
        ev.stopPropagation();
	var university_id = $(this).find('input[name=fahuo_university_id_hidden]').val();
	var university_name = $(this).find('input[name=fahuo_university_name_hidden]').val();
	document.getElementById("fahuo_university").value = university_name;
	document.getElementById("fahuo_university_id").value = university_id;
        ok = (typeof ok != 'undefined') ? ok : false;
        if (ok) return true;
        $.blockUI({ message: $('#notify_delivery_question'), css: { width: '400px',height:'270px',border:'10px solid #999999'} });
        return false;
}

$(document).ready(function() {

	$(".notify_deliver_form").bind('submit', notifyDelivery);
        $('#yes_notify').click(function() {
		var university_id = document.getElementById("fahuo_university_id").value;
		document.getElementById("fahuo_comment_hidden" + university_id ).value = document.getElementById("fa_comment").value;
		var datetime = $('#fa_time').datetimebox('getValue');
		document.getElementById("fahuo_address_hidden" + university_id).value = document.getElementById("fa_address").value;
		document.getElementById("fahuo_time_hidden" + university_id).value = datetime;
		
		var selectedValues="";
		$checkedCheckboxes = $("input:checkbox[name='checkbox" + university_id + "']:checked");
		$checkedCheckboxes.each(function () {
			selectedValues +=  $(this).val() +",";
		});
		document.getElementById("fahuo_users_hidden" + university_id).value =  selectedValues;
                $("#notify_deliver_form" + university_id).trigger('submit', [true]);
                $.blockUI({ message: "<div style=\"margin-left:50px;flaot:left;margin-top:15px;font-size:14px;color:#999999;\">处理中...请不要关闭该页面！</div>" , css:{height:'50px',width:'400px',border:'10px solid #999999'}});
        });

        $('#no_notify').click(function() {
                $.unblockUI();
                return false;
	});
});
